<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

 <head>

  <title>CSS Test: Border conflict resolution - adjacent table row groups with same border-style and border-width</title>

  <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
  <link rel="help" href="http://www.w3.org/TR/CSS21/tables.html#border-conflict-resolution" title="17.6.2.1 Border conflict resolution" />

  <meta content="image" name="flags" />
  <meta content="When two adjacent table row groups (eg. thead, tbody, tfoot) have the same border-width and the same border-style in a 'border-collapse: collapse' table, then the color of the border from the topmost table row group wins: so, a thead wins over a tbody which wins over tfoot." name="assert" />

  <link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
  <style type="text/css"><![CDATA[
  table#test {border: red solid 1em;}

  table
  {
  border-collapse: collapse;
  color: white;
  font: 1.25em/1 Ahem;
  margin: auto auto 2em 2em;
  }

  thead, tbody, tfoot {border: solid 1em;}

  thead {border-color: blue;}
  tbody {border-color: yellow;}
  tfoot {border-color: orange;}

  td {padding: 0px;}

  table#reference > tbody {border: red none 0em;}

  img
  {
  height: 1em;
  vertical-align: bottom;
  /*
  With 'vertical-align: bottom', swatch-[color] images "sit"
  at the bottom of the cell's line box and not on its baseline
  */
  width: 1em;
  }
  ]]></style>

 </head>

 <body>

  <p>Test passes if both multi-colored rectangular structures are <strong>perfectly identical</strong>.</p>

  <table id="test">

   	<thead>
		<tr><td>B</td><td>L</td><td>U</td><td>E</td></tr>
	</thead>

   	<tfoot>
		<tr><td>O</td><td>R</td><td>A</td><td>N</td></tr>
	</tfoot>

	<tbody>
		<tr><td>Y</td><td>E</td><td>L</td><td>L</td></tr>
	</tbody>

  </table>


  <table id="reference">

    <tr>
      <td><img src="support/swatch-blue.png" alt="Image download support must be enabled" /><img src="support/swatch-blue.png" alt="Image download support must be enabled" /><img src="support/swatch-blue.png" alt="Image download support must be enabled" /><img src="support/swatch-blue.png" alt="Image download support must be enabled" /><img src="support/swatch-blue.png" alt="Image download support must be enabled" /><img src="support/swatch-blue.png" alt="Image download support must be enabled" /></td>
    </tr>

    <tr>
      <td><img src="support/swatch-blue.png" alt="Image download support must be enabled" /><img src="support/swatch-white.png" alt="Image download support must be enabled" /><img src="support/swatch-white.png" alt="Image download support must be enabled" /><img src="support/swatch-white.png" alt="Image download support must be enabled" /><img src="support/swatch-white.png" alt="Image download support must be enabled" /><img src="support/swatch-blue.png" alt="Image download support must be enabled" /></td>
    </tr>

    <tr>
      <td><img src="support/swatch-blue.png" alt="Image download support must be enabled" /><img src="support/swatch-blue.png" alt="Image download support must be enabled" /><img src="support/swatch-blue.png" alt="Image download support must be enabled" /><img src="support/swatch-blue.png" alt="Image download support must be enabled" /><img src="support/swatch-blue.png" alt="Image download support must be enabled" /><img src="support/swatch-blue.png" alt="Image download support must be enabled" /></td>
    </tr>

    <tr>
      <td><img src="support/swatch-yellow.png" alt="Image download support must be enabled" /><img src="support/swatch-white.png" alt="Image download support must be enabled" /><img src="support/swatch-white.png" alt="Image download support must be enabled" /><img src="support/swatch-white.png" alt="Image download support must be enabled" /><img src="support/swatch-white.png" alt="Image download support must be enabled" /><img src="support/swatch-yellow.png" alt="Image download support must be enabled" /></td>
    </tr>

    <tr>
      <td><img src="support/swatch-yellow.png" alt="Image download support must be enabled" /><img src="support/swatch-yellow.png" alt="Image download support must be enabled" /><img src="support/swatch-yellow.png" alt="Image download support must be enabled" /><img src="support/swatch-yellow.png" alt="Image download support must be enabled" /><img src="support/swatch-yellow.png" alt="Image download support must be enabled" /><img src="support/swatch-yellow.png" alt="Image download support must be enabled" /></td>
    </tr>

    <tr>
      <td><img src="support/swatch-orange.png" alt="Image download support must be enabled" /><img src="support/swatch-white.png" alt="Image download support must be enabled" /><img src="support/swatch-white.png" alt="Image download support must be enabled" /><img src="support/swatch-white.png" alt="Image download support must be enabled" /><img src="support/swatch-white.png" alt="Image download support must be enabled" /><img src="support/swatch-orange.png" alt="Image download support must be enabled" /></td>
    </tr>

    <tr>
      <td><img src="support/swatch-orange.png" alt="Image download support must be enabled" /><img src="support/swatch-orange.png" alt="Image download support must be enabled" /><img src="support/swatch-orange.png" alt="Image download support must be enabled" /><img src="support/swatch-orange.png" alt="Image download support must be enabled" /><img src="support/swatch-orange.png" alt="Image download support must be enabled" /><img src="support/swatch-orange.png" alt="Image download support must be enabled" /></td>
    </tr>

  </table>

 </body>
</html>
